package componentes;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JPanel;

/**
 * @author Reynald0
 */
public class CompBoton2 extends JButton
{
   public CompBoton2(JPanel pPanel,String pEtiqueta,ActionListener pAccion,String pPosicion)
   {
      if(pEtiqueta==null) pEtiqueta="Nuevo Boton";
      this.setText(pEtiqueta);
      this.setAlignmentX(CENTER_ALIGNMENT);
      this.addActionListener(pAccion);
      if(pPanel!=null) pPanel.add(this,pPosicion);
   }
}
